﻿using UnityEngine;
using System.Collections;
using System;

[Serializable]
/// <summary>
/// 地图图标实体
/// </summary>
public class MapMaker :MapObject{

    /// <summary>
    /// 中心点
    /// </summary>
    private MapLocation centerPoint;

    private Texture2D texture;

    private Texture2D clickTexture;

    /// <summary>
    /// 宽
    /// </summary>
    private int width;

    /// <summary>
    /// 高
    /// </summary>
    private int height;

    public int Width
    {
        get
        {
            return width;
        }

        set
        {
            width = value;
        }
    }

    public int Height
    {
        get
        {
            return height;
        }

        set
        {
            height = value;
        }
    }

    public MapLocation CenterPoint
    {
        get
        {
            return centerPoint;
        }

        set
        {
            centerPoint = value;
        }
    }

    public Texture2D Texture
    {
        get
        {
            return texture;
        }

        set
        {
            texture = value;
        }
    }

    public Texture2D ClickTexture
    {
        get
        {
            return clickTexture;
        }

        set
        {
            clickTexture = value;
        }
    }

    /// <summary>
    /// 设置点击和平常的状态
    /// </summary>
    /// <param name="texture">正常纹理</param>
    /// <param name="clickTexture">点击后的纹理</param>
    public void setState(Texture2D texture, Texture2D clickTexture)
    {
        this.Texture= texture;

        this.ClickTexture= clickTexture;
    }
}
